Skip to content

[c++26 fix] include <exception> in Gen.hpp - #344

Merged
emil-e merged 1 commit into
emil-e:masterfrom
marcia-pedals:master
Aug 6, 2026
Merged

[c++26 fix] include <exception> in Gen.hpp#344
emil-e merged 1 commit into
emil-e:masterfrom
marcia-pedals:master

Conversation

@marcia-pedals

@marcia-pedals marcia-pedals commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

When compiling in a c++26 project, I get this error:

  rapidcheck/Gen.hpp:72:22: error: calling 'current_exception' with incomplete return type 'exception_ptr'
     72 |     auto exception = std::current_exception();
        |                      ^~~~~~~~~~~~~~~~~~~~~~~~
  .../exception/operations.h:36:33: note: forward declaration of 'std::exception_ptr'
     36 | class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
        |                                 ^

Including <exception> fixes it, and this seems correct to me because https://en.cppreference.com/w/cpp/error/exception_ptr.html says that it's defined in <exception>.

@emil-e
emil-e merged commit 6e8dadf into emil-e:master Aug 6, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants